﻿using System;
using System.Security.Principal;

namespace DNT.RavenQA.Core.Extensions
{
    public static class PrincipalExtensions
    {
        public static Boolean IsAuthenticated(this IPrincipal principal)
        {
            return principal.IsNotNull() && principal.Identity.IsNotNull() && principal.Identity.IsAuthenticated;
        }
    }
}
